package fate.car.pojo;

/**
 * 汽车实体类
 * 
 * @author Administrator
 *
 */
public class ACar
{
	private String number;
	private String ctype;
	private String color;
	private String price;
	private String imgPath;
	private String rentprice;
	private String deposit;
	private byte status;
	private String description;
	private String createTime;
	private String updateTime;
	
	/* 字符串的显示 */
	/* 状态的字符串描述 */
	private String statusStr ; 
	
	public String getStatusStr()
	{
		/*
		 * 状态:0:禁用,1:启用
		 * */
		/*if(this.status == 0)
		{
			this.statusStr = "禁用" ; 
		}else if(this.status == 1)
		{
			this.statusStr = "启用" ; 
		}*/
		
		ACarsEnum[] adminsEnums = ACarsEnum.values();
		for (int i = 0; i < adminsEnums.length; i++)
		{
			ACarsEnum adminsEnum = adminsEnums[i];
			/*System.out.println(adminsEnum.getStatus() + "---" + adminsEnum.getInfo()
			+ "-----" + adminsEnum);*/
			/* 将来会有值一样,含义不一样的枚举
			 * 要加上区分枚举项的判断
			 *  */
			if(adminsEnum.getStatus() == this.status
				&& adminsEnum.toString().startsWith("STATUS_"))
			{
				this.statusStr = adminsEnum.getInfo() ; 
			}
		}
		return statusStr;
	}
	
	
	public String getImgPath()
	{
		return imgPath;
	}


	public void setImgPath(String imgPath)
	{
		this.imgPath = imgPath;
	}


	public byte getStatus()
	{
		return status;
	}
	public void setStatus(byte status)
	{
		this.status = status;
	}
	public String getNumber()
	{
		return number;
	}
	public void setNumber(String number)
	{
		this.number = number;
	}
	public String getCtype()
	{
		return ctype;
	}
	public void setCtype(String ctype)
	{
		this.ctype = ctype;
	}
	public String getColor()
	{
		return color;
	}
	public void setColor(String color)
	{
		this.color = color;
	}
	public String getPrice()
	{
		return price;
	}
	public void setPrice(String price)
	{
		this.price = price;
	}
	public String getRentprice()
	{
		return rentprice;
	}
	public void setRentprice(String rentprice)
	{
		this.rentprice = rentprice;
	}
	public String getDeposit()
	{
		return deposit;
	}
	public void setDeposit(String deposit)
	{
		this.deposit = deposit;
	}
	public String getDescription()
	{
		return description;
	}
	public void setDescription(String description)
	{
		this.description = description;
	}
	public String getCreateTime()
	{
		return createTime;
	}
	public void setCreateTime(String createTime)
	{
		this.createTime = createTime;
	}
	public String getUpdateTime()
	{
		return updateTime;
	}
	public void setUpdateTime(String updateTime)
	{
		this.updateTime = updateTime;
	}
	
	
}
